<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex align-stretch benben-position-layout flex agreements_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex align-center justify-between flex-sub agreements_fd0_0'>
					<view class='flex align-center agreements_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
						<text class='fu-iconfont2  agreements_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex align-center'>
						<text class='agreements_fd0_0_c1_c0'>提现规则</text>
					</view>
					<view class='flex align-center agreements_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			
			<view class="loading_css" v-if="isShow">
				<u-loading size="36" color="#988AFB"></u-loading>
				<view>加载中</view>
			</view>
			<view class="ben_fu-jyf-parser_1" v-else>
				<jyf-parser :html="dataMessage.content | richTextFormat"></jyf-parser>
			</view>
			
			<view class='flex flex-wrap align-center justify-center Withdrawals_fd1_2'>
				<button class='Withdrawals_fd1_2_c0' @tap.stop="postWithdrawalFunc()">提现</button>
			</view>
			<view style="height: 130rpx;"></view>
		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},


		data() {
			return {
				"dataMessage": {
					"aid": "",
					"name": "",
					"thumb_img": "",
					"content": "",
					"introduce": ""
				},
				"isShow": true,
				"embody_id": "",
				"cash_fee": "",
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {embody_id, cash_fee} = options;
			if (embody_id !== undefined) this.embody_id = embody_id;
			if (cash_fee !== undefined) this.cash_fee = cash_fee;
			this.queryEssayFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//发送提现接口
			async postWithdrawalFunc() {
				//请求方法
				//数据验证
				let datadataMessage = await this.$api.post(global.apiUrls.post656f27de9de37, {
					account_type: this.embody_id,
					cash_fee: this.cash_fee
				});
			
				if (datadataMessage.data.code != 1) {
					this.$message.info(datadataMessage.data.msg);
					return
				}
				let infodataMessage = datadataMessage.data;
				this.$message.info(datadataMessage.data.msg);
				setTimeout(() => {
					this.$urouter.redirectTo(
						`/pages/wd/application/application?type=${this.embody_id}&money=${this.cash_fee}`);
				}, 800)
				
			},
			//系统文章--获取系统单页内容
			async queryEssayFunc() {
				//请求方法
				//数据验证

				let datadataMessage = await this.$api.post(global.apiUrls.post656f313a73452, {
					id: 22
				});
				this.isShow = false;
				if (datadataMessage.data.code != 1) {
					this.$message.info(datadataMessage.data.msg);
					return
				}
				let infodataMessage = datadataMessage.data;
				this.dataMessage = infodataMessage.data;
			},
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto;
	}

	.agreements_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.agreements_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: var(--benbenFontColor0);
	}

	.agreements_fd0_0_c0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
	}

	.agreements_fd0_0_c0 {
		width: 180rpx;
	}

	.agreements_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
	}

	.ben_fu-jyf-parser_1 {
		background-color: #fff;
		padding-left: 32rpx;
		padding-right: 32rpx;
		padding-top: 32rpx;
		padding-bottom: 32rpx;

	}
	
	.Withdrawals_fd1_2_c0 {
		background: var(--benbenbgColor0);
		font-size: 32rpx;
		color: #fff;
		width: 686rpx;
		height: 88rpx;
		line-height: 88rpx;
		font-weight: 700;
		border-radius: 8rpx;
	}
	
	.Withdrawals_fd1_2 {
		width: 750rpx;
		position: fixed;
		left: 0rpx;
		bottom: calc(40rpx + var(--window-bottom));
	}
</style>